package com.itqf.mapper;

import com.itqf.entity.TbItem;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * @Description:
 * @Company: 千锋互联
 * @Author: 李丽婷
 * @Date: 2020/11/4
 * @Time: 下午2:55
 */
public interface TbItemMapper {


    public List<TbItem>  findItem();

    public  int  update(TbItem tbItem);

    //练习参数绑定
    //序号传参
    public  List<TbItem>  findByTitleAndPrice(String title,long price);
    //参数变量 传参（推荐，可读性好）
    public  List<TbItem>  findByTitleAndPrice2(@Param("title") String title,@Param("price") long price);
    //对象传参
    public  List<TbItem>  findByTitleAndPrice3(TbItem tbItem);
    //map
    public  List<TbItem>  findByTitleAndPrice4(Map<String,Object> map);
    //参数绑定结束

    public  int  insertItem(TbItem tbItem);
    public  int  insertItem2(TbItem tbItem);

    //resultMap
    public   List<TbItem>  findAll();

    //驼峰式映射规则
    public   List<TbItem>  findAll1();
}
